package com.inspection.constant;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author zhaoqi
 * @since 2020-12-04
 */
@AllArgsConstructor
@Getter
public enum MenuTypeEnum {
    CATEGORY(0, "目录"),
    MENU(1, "菜单"),
    BUTTON(2, "按钮");
    private int type;

    private String msg;

    public static MenuTypeEnum get(Integer type) {
        MenuTypeEnum[] values = MenuTypeEnum.values();
        for (MenuTypeEnum value : values) {
            if (value.getType() == type) {
                return value;
            }
        }
        return null;
    }

}
